<html>
    <head>
        <title>联系我们</title>
        <style type = "text/css">
            ul.errorlist{
                margin:0;
                padding:0;
            }
            .errorlist li{
                background-color:red;
                color:white;
                display:block;
                font-size:10px;
                margin:0 0 3px;
                padding:4px 5px;
            }

        </style>
    </head>
    <body>
        <h1>联系我们</h1>
        {% if form.errors %}
            <p style="color:red">
                请修正提及的错误
            </p>
            {% endif %}
        <form action="" method = "post">
           <div class="field">
               {{ form.subject.errors }}
               <label for="id_subject">Subject:</label>
               {{ form.subject }}
           </div> 
           <div class="field">
               {{ form.email.errors }}
               <label for="id_email">你的邮箱:</label>
               {{ form.email }}
           </div>
           <div class="field">
               {{ form.message.errors }}
               <label for = "id_message">信息：</label>
               {{ form.message }}
           </div>
            {% csrf_token %}
            <input type="submit" value = "提交">
        </form>
    </body>
</html>